package com.singhanuvrat.soccerstats.Utils

import org.jsoup.Jsoup

class JsoupUtils {
    def static getDocument(String url) {
        def tries = 5;
        def doc = null;

        while(tries-- && !doc) {
            try {
                doc = Jsoup.connect(url).get()
            } catch (IOException e) {
                println "Failed for url " + url
            }
        }

        return doc
    }
}
